<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="root">
        <base-checkbox v-model="lovingVue"></base-checkbox>
    </div>
    <script>
        Vue.component('base-checkbox', {
            model: {
                prop: 'checked',
                event: 'change'
            },
            props: {
                checked: Boolean
            },
            template: `<div>
                <input
                  type="checkbox"
                  v-bind:checked="checked"
                  v-on:change="$emit('change', $event.target.checked)"
                ><span>{{checked}}</span>
              </div>`
        })
        let vm = new Vue({
            el:"#root",
            data: {
                lovingVue: true
            }
        })
    </script>
</body>
</html>